<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libfuse: fuse_opt Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">libfuse
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',false,false,'search.php','Search');
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-attribs">Data Fields</a>  </div>
  <div class="headertitle">
<div class="title">fuse_opt Struct Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="fuse__opt_8h_source.html">fuse_opt.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Data Fields</h2></td></tr>
<tr class="memitem:a215255be3ed5c0f6c3e0d5dcc96d7b12"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfuse__opt.html#a215255be3ed5c0f6c3e0d5dcc96d7b12">templ</a></td></tr>
<tr class="separator:a215255be3ed5c0f6c3e0d5dcc96d7b12"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a333dcd849a3bd54df06084a69b5a8d39"><td class="memItemLeft" align="right" valign="top">unsigned long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfuse__opt.html#a333dcd849a3bd54df06084a69b5a8d39">offset</a></td></tr>
<tr class="separator:a333dcd849a3bd54df06084a69b5a8d39"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeb76339e1ce6948ad94bd2d4d5d01e20"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfuse__opt.html#aeb76339e1ce6948ad94bd2d4d5d01e20">value</a></td></tr>
<tr class="separator:aeb76339e1ce6948ad94bd2d4d5d01e20"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Option description</p>
<p>This structure describes a single option, and action associated with it, in case it matches.</p>
<p>More than one such match may occur, in which case the action for each match is executed.</p>
<p>There are three possible actions in case of a match:</p>
<p>i) An integer (int or unsigned) variable determined by 'offset' is set to 'value'</p>
<p>ii) The processing function is called, with 'value' as the key</p>
<p>iii) An integer (any) or string (char *) variable determined by 'offset' is set to the value of an option parameter</p>
<p>'offset' should normally be either set to</p>
<ul>
<li>'offsetof(struct foo, member)' actions i) and iii)</li>
<li>-1 action ii)</li>
</ul>
<p>The 'offsetof()' macro is defined in the &lt;stddef.h&gt; header.</p>
<p>The template determines which options match, and also have an effect on the action. Normally the action is either i) or ii), but if a format is present in the template, then action iii) is performed.</p>
<p>The types of templates are:</p>
<p>1) "-x", "-foo", "--foo", "--foo-bar", etc. These match only themselves. Invalid values are "--" and anything beginning with "-o"</p>
<p>2) "foo", "foo-bar", etc. These match "-ofoo", "-ofoo-bar" or the relevant option in a comma separated option list</p>
<p>3) "bar=", "--foo=", etc. These are variations of 1) and 2) which have a parameter</p>
<p>4) "bar=%s", "--foo=%lu", etc. Same matching as above but perform action iii).</p>
<p>5) "-x ", etc. Matches either "-xparam" or "-x param" as two separate arguments</p>
<p>6) "-x %s", etc. Combination of 4) and 5)</p>
<p>If the format is "%s", memory is allocated for the string unlike with scanf(). The previous value (if non-NULL) stored at the this location is freed. </p>

<p class="definition">Definition at line <a class="el" href="fuse__opt_8h_source.html#l00077">77</a> of file <a class="el" href="fuse__opt_8h_source.html">fuse_opt.h</a>.</p>
</div><h2 class="groupheader">Field Documentation</h2>
<a id="a333dcd849a3bd54df06084a69b5a8d39"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a333dcd849a3bd54df06084a69b5a8d39">&#9670;&nbsp;</a></span>offset</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned long fuse_opt::offset</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Offset of variable within 'data' parameter of <a class="el" href="fuse__opt_8h.html#a539ef1f571c34f516c60c4cbe2901c0e">fuse_opt_parse()</a> or -1 </p>

<p class="definition">Definition at line <a class="el" href="fuse__opt_8h_source.html#l00085">85</a> of file <a class="el" href="fuse__opt_8h_source.html">fuse_opt.h</a>.</p>

</div>
</div>
<a id="a215255be3ed5c0f6c3e0d5dcc96d7b12"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a215255be3ed5c0f6c3e0d5dcc96d7b12">&#9670;&nbsp;</a></span>templ</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* fuse_opt::templ</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Matching template and optional parameter formatting </p>

<p class="definition">Definition at line <a class="el" href="fuse__opt_8h_source.html#l00079">79</a> of file <a class="el" href="fuse__opt_8h_source.html">fuse_opt.h</a>.</p>

</div>
</div>
<a id="aeb76339e1ce6948ad94bd2d4d5d01e20"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeb76339e1ce6948ad94bd2d4d5d01e20">&#9670;&nbsp;</a></span>value</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int fuse_opt::value</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Value to set the variable to, or to be passed as 'key' to the processing function. Ignored if template has a format </p>

<p class="definition">Definition at line <a class="el" href="fuse__opt_8h_source.html#l00091">91</a> of file <a class="el" href="fuse__opt_8h_source.html">fuse_opt.h</a>.</p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li>include/<a class="el" href="fuse__opt_8h_source.html">fuse_opt.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
